package org.coder.boot.consumer;

import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.Method;
import org.coder.api.EchoService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @description:
 * @author: coder97
 * @since: 2021/03/16
 */
@Configuration
public class ConsumerConfiger {

    @DubboReference(timeout = 3000,methods = {@Method(name = "echo",timeout = 4000)})
    public EchoService echoService;

    @Bean
    public EchoService echoService(){
        return echoService;
    }

}